import {createApp} from 'vue'
import "@/assets/css/icon/index.less"
// @ts-ignore
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './conf/router'
import store from './conf/store'

// @ts-ignore
import GlobalComponents from "@/components/install";
// @ts-ignore
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// @ts-ignore
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'dayjs/locale/zh-cn'
import Modal from "@/components/global/Modal";

const app = createApp(App);
app.use(store).use(router);
app.use(ElementPlus, {size: 'default', zIndex: 1000, locale: zhCn});
// @ts-ignore
Modal._context = app._context;
app.use(Modal);
app.use(GlobalComponents);


for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app')
